import copy

l0 = [1, 2, 3, 4, 5, ["a"]]
# 等号赋值
# l2 = l0
# print(id(l0), id(l2))
#
# l0.append(6)
# print(l0, l2)


# l3 = l0.copy()
# l3 = copy.copy(l0)
# print(id(l0), id(l3))
# # l0.append(6)
# # print(l0, l3)
# print(id(l0[5]), id(l3[5]))
# l0[5].append("b")
# print(l0, l3)


# l4 = copy.deepcopy(l0)
# print(id(l4), id(l0))
#
# print(id(l4[5]), id(l0[5]))
# l4.append(6)
# l4[5].append("b")
# print(l0, l4)


d0 = {
    "name": "又睡着了",
    "addr": []
}
d2 = d0
d0["age"] = 100
print(d2)

d3 = d0.copy()
d0["sex"] = "男"
print(d3)
d0["addr"].append("郑州")
print(d3)


d4 = copy.deepcopy(d0)

d0.clear()
print(d4)